Techniques for disambiguating unconnected components in a visual programming interface

ABSTRACT

Computer-implemented techniques for disambiguating unconnected visual pieces in a visual programming interface (VPI) that allows a user to manipulate visual pieces to generate computer code are disclosed. The techniques include generating the VPI, receiving a command to move a selected visual piece to a requested location in the VPI, and adjusting the position of the selected visual piece to the requested location. The techniques include determining whether the selected visual piece is connected to a proximate visual piece. When the two visual pieces are not connected, the techniques include i) determining a distance between the two visual pieces, ii) comparing the distance to a distance threshold, and iii) when the distance is not greater than the distance threshold, adjusting the position of the selected visual piece and/or the proximate visual piece such that the distance between the two visual pieces is greater than the predetermined distance threshold.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a continuation of U.S. patent application Ser. No.13/832,710 filed on Mar. 15, 2013. The entire disclosure of the aboveapplication is incorporated herein by reference.

FIELD

The present disclosure relates to techniques for disambiguatingunconnected visual pieces in a visual programming interface.

BACKGROUND

The background description provided herein is for the purpose ofgenerally presenting the context of the disclosure. Work of thepresently named inventors, to the extent it is described in thisbackground section, as well as aspects of the description that may nototherwise qualify as prior art at the time of filing, are neitherexpressly nor impliedly admitted as prior art against the presentdisclosure.

Visual programming languages are programming languages that allowprogrammers to generate computer programs using graphical elements, asopposed to generating code textually. A programmer can generate thecomputer program using a visual programming interface. Some visualprogramming interfaces allow the programmer to connect graphicalelements with one another to generate expressions, statements, routines,functions, or the like. For example, a programmer may connect anoperator, e.g., a plus operator, with two operands, e.g., two integers,to create a mathematical expression. As can be appreciated, theprogrammer can create increasingly complex computer code, which can becompiled into an executable program.

SUMMARY

In various embodiments, a computer-implemented method for generating, ata computing device having one or more processors, a visual programminginterface is disclosed. The visual programming interface can bedisplayed at a user device and allow a user to manipulate a plurality ofvisual pieces that represent computer instructions to generate computercode. A connection between visual pieces in the visual programminginterface can represent a relationship between corresponding computerinstructions in the generated computer code. Each visual piece caninclude at least one connector and visual pieces may be connected whentheir corresponding connectors are aligned and their correspondingcomputer instructions are logically compatible. The method can furtherinclude receiving user input indicating a command to move a selectedvisual piece to a requested location in the visual programminginterface.

A distance table can also be generated at the computing device. Thedistance table can store locations of one or more other visual pieceswith respect to the selected visual piece in the visual programminginterface. The distance table can be indexed by one of (i) X-coordinatesof the other visual pieces with respect to the selected visual piece and(ii) Y-coordinates of the other visual pieces with respect to theselected visual piece. The method can further include storing the otherone of the (i) X-coordinates of the other visual pieces with respect tothe selected visual piece and (ii) Y-coordinates of the other visualpieces with respect to the selected visual piece, wherein the one ormore other visual pieces include the proximate visual piece.

Additionally, the method can determine whether the selected visual pieceis connected to a proximate visual piece based on the distance table.When the selected visual piece is not connected to the proximate visualpiece, the method can include determining a distance between theselected visual piece and the proximate visual piece. When the distanceis not greater than a predetermined distance threshold, the method canfurther adjust a position of the selected visual piece or the proximatevisual piece such that the distance is greater than the predetermineddistance threshold.

In further embodiments, another computer-implemented method forgenerating, at a computing device having one or more processors, avisual programming interface is disclosed. The visual programminginterface can be displayed at a user device and allow a user tomanipulate a plurality of visual pieces that represent computerinstructions to generate computer code. A connection between visualpieces in the visual programming interface can represent a relationshipbetween corresponding computer instructions in the generated computercode. The method can also include receiving user input indicating acommand to move a selected visual piece to a requested location in thevisual programming interface, and determining whether the selectedvisual piece is connected to a proximate visual piece at the requestedlocation. Additionally, when the selected visual piece is not connectedto the proximate visual piece, the method can include determining adistance between the selected visual piece at the requested location andthe proximate visual piece. When the distance is not greater than apredetermined distance threshold, the method can include adjusting aposition of the selected visual piece or the proximate visual piece suchthat the distance is greater than the predetermined distance threshold.

According to various embodiments of the present disclosure, the methodcan further include generating one or more data structures, eachindividual data structure representing a set of interconnected visualpieces, wherein each interconnected visual piece in the set ofinterconnected visual pieces is connected to at least one other visualpiece represented in the individual data structure.

Additionally or alternatively, the selected visual piece can bedetermined to be connected to the proximate visual piece when theselected visual piece and the proximate visual piece are members of asame data structure of the one or more data structures.

The method can further include, in some embodiments, generating adistance table storing locations of one or more other visual pieces withrespect to the selected visual piece in the visual programminginterface, the distance table being indexed by one of (i) X-coordinatesof the other visual pieces with respect to the selected visual piece and(ii) Y-coordinates of the other visual pieces with respect to theselected visual piece, and storing the other one of the (i)X-coordinates of the other visual pieces with respect to the selectedvisual piece and (ii) Y-coordinates of the other visual pieces withrespect to the selected visual piece, wherein the one or more othervisual pieces include the proximate visual piece. Additionally, themethod can include determining whether the proximate visual piece iswithin the predetermined distance based on the distance table.

The plurality of visual pieces can each include at least one connector,wherein visual pieces are connected when their corresponding connectorsare aligned and their corresponding computer instructions are logicallycompatible. Further, adjusting the position of the selected visual pieceor the position of the proximate visual piece can be in a predetermineddirection and by a predetermined distance.

In various embodiments, the method can further include, upon adjustingthe position of the selected visual piece or the proximate visual piecedetermining whether one of the selected visual piece and the proximatevisual piece is connected to a different proximate visual piece. Whenthe one of the selected visual piece and the proximate visual piece isnot connected to the different proximate visual piece, the method caninclude determining a new distance between the one of the selectedvisual piece and the proximate visual piece and the different proximatevisual piece. When the new distance is not greater than thepredetermined distance threshold, the method can further includeadjusting a position of the different proximate visual piece such thatthe new distance is greater than the predetermined distance threshold.

In some embodiments, the position of the selected visual piece is onlyadjusted no more than twice and the position of the proximate visualpiece is adjusted no more than once. Additionally or alternatively, thecomputer instructions can include one or more of a declaration of avariable, an assignment of a value to the variable, a mathematicaloperation performed on one or more operands, an input instruction, anoutput instruction, a logic instruction, and a control instruction.

According to various embodiments of the present disclosure, acomputer-implemented system is disclosed. The system can include a userinterface module. The user interface module can generate a visualprogramming interface that is displayed at a user device. The visualprogramming interface can allow a user to manipulate a plurality ofvisual pieces that represent computer instructions to generate computercode, where a connection between visual pieces represents a relationshipbetween corresponding computer instructions in the generatedcomputer-code. The user interface module can further receive user inputindicating a command to move a selected visual piece to a requestedlocation in the visual programming interface.

The system can further include an ambiguity determination module thatdetermines whether the selected visual piece is connected to a proximatevisual piece at the requested location. When the selected visual pieceis not connected to the proximate visual piece, the ambiguitydetermination module can determine a distance between the selectedvisual piece at the requested location and the proximate visual piece.When the distance is not greater than a predetermined distancethreshold, ambiguity determination module can adjust a position of theselected visual piece or the proximate visual piece such that thedistance is greater than the predetermined distance threshold.

The system can further include a data structure generation module thatgenerates one or more data structures. Each individual data structurecan represent a set of interconnected visual pieces, wherein eachinterconnected visual piece in the set of interconnected visual piecesis connected to at least one other visual piece represented in theindividual data structure. In some embodiments, the ambiguitydetermination module can determine that the selected visual piece isconnected to the proximate visual piece when the selected visual pieceand the proximate visual piece are members of a same data structure ofthe one or more data structures.

The system can further include a distance determination module thatgenerates a distance table storing locations of one or more other visualpieces with respect to the selected visual piece in the visualprogramming interface. The distance table can be indexed by one of (i)X-coordinates of the other visual pieces with respect to the selectedvisual piece and (ii) Y-coordinates of the other visual pieces withrespect to the selected visual piece. The distance determination modulecan also store the other one of the (i) X-coordinates of the othervisual pieces with respect to the selected visual piece and (ii)Y-coordinates of the other visual pieces with respect to the selectedvisual piece, wherein the one or more other visual pieces include theproximate visual piece. The ambiguity determination module can determinewhether the proximate visual piece is within the predetermined distancebased on the distance table.

According to various embodiments of the present disclosure, theplurality of visual pieces can each include at least one connector,wherein visual pieces are connected when their corresponding connectorsare and their corresponding computer instructions are logicallycompatible.

Additionally or alternatively, the ambiguity determination module canadjust the position of the selected visual piece or the position of theproximate visual piece in a predetermined direction and by apredetermined distance. Upon adjusting the position of the selectedvisual piece or the position of the proximate visual piece, theambiguity determination module can determine whether one of the selectedvisual piece and the proximate visual piece is connected to a differentproximate visual piece. When the one of the selected visual piece andthe proximate visual piece is not connected to the different proximatevisual piece, the ambiguity determination module can determine a newdistance between the one of the selected visual piece and the proximatevisual piece and the different proximate visual piece. When the newdistance is not greater than the predetermined distance threshold, theambiguity determination module can, adjust a position of the selectedvisual piece or the proximate visual piece such that the distance isgreater than the predetermined distance threshold.

Further areas of applicability of the present disclosure will becomeapparent from the detailed description provided hereinafter. It shouldbe understood that the detailed description and specific examples areintended for purposes of illustration only and are not intended to limitthe scope of the disclosure.

BRIEF DESCRIPTION OF THE DRAWINGS

The present disclosure will become more fully understood from thedetailed description and the accompanying drawings, wherein:

FIGS. 1A and 1B are drawings illustrating example environments forproviding a visual programming interface according to some embodimentsof the present disclosure;

FIG. 2 is a drawing illustrating an example of a visual programminginterface according to some embodiments of the present disclosure;

FIGS. 3A and 3B are drawings illustrating examples of visual pieces andconnecting visual pieces according to some embodiments of the presentdisclosure;

FIGS. 4A and 4B are drawings illustrating examples of an ambiguitybetween two visual pieces and disambiguating the two visual piecescausing the ambiguity, respectively, according to some embodiments ofthe present disclosure;

FIG. 5 is a flow chart illustrating an example technique for identifyingan ambiguity in a visual programming interface and disambiguating thetwo visual pieces causing the ambiguity according to some embodiments ofthe present disclosure; and

FIG. 6 is a block diagram illustrating example components of a visualprogramming module according to some embodiments of the presentdisclosure.

DETAILED DESCRIPTION

FIGS. 1A and 1B illustrate example environments for presenting a visualprogramming interface (VPI) to a user. A VPI can be a graphical userinterface (GUI) that allows a user, e.g., a programmer, to generatecomputer code using a plurality of visual pieces, which are described ingreater detail below. In FIG. 1A, the VPI can be generated by a visualprogramming module 50 that is implemented at one or more servers 10. Theserver 10 can generate the VPI and transmit it over a network 20 fordisplay at a user device 30. In the illustrated example, the server 10may execute computer-executable instructions for generating andmanipulating the VPI and provide the VPI to the user device 30 fordisplay. In some embodiments, the server 10 may provide thecomputer-executable instructions to the user device 30, which in turnexecutes the computer-executable instructions. It should be appreciatedthat the server 10 can include one or more processors, and in someembodiments, a plurality of distributed servers 10 can generate the VPI.In FIG. 1B, the visual programming module 50 is implemented at the userdevice 30, which executes computer-executable instructions forgenerating and manipulating the VPI.

Referring now to FIG. 2, an example of a visual programming interface100 (VPI) is illustrated. The example VPI 100 may include a menu area102 and a programming area 104. It should be appreciated that the VPI100 is provided for example only and not intended to limit the scope ofthe disclosure.

The programming area 104 is the portion of the VPI 100 where a user canposition visual pieces in relation to other visual pieces to createcomputer code. A visual piece can be a graphical element that representsa computer instruction. A computer instruction can be any instructionthat can be compiled and executed by a processor. For example, aninstruction can be a declaration of a variable, an assignment of a valueto a variable, a mathematical operation performed on one or moreoperands, an input instruction, an output instruction, a logicinstruction such as an if-else instruction or a do-while instruction, acontrol instruction such as a function declaration, or any other type ofinstruction. The user can connect two or more visual pieces, such that aconnection indicates a relationship between the instructions representedby the two or more visual pieces. The resulting relationship may be anexpression which returns a value or a statement which does not return avalue.

In the illustrated example, the user has generated a function using aplurality of visual pieces. At the highest level, the user has includeda procedure visual piece 120. The procedure visual piece 120 can receivezero or more arguments. The user can define the arguments by connectingone or more visual pieces to the procedure visual piece 120. In theexample, the user has connected a first argument visual piece 122referencing a variable “A” and a second argument visual piece 124referencing a variable “B” to the procedure visual piece 120. If theuser desires, the user can connect an additional argument visual pieceto the procedure visual piece 120 at a connector 126. The procedurevisual piece 120 can also have a variable visual piece 142 indicating avalue that is returned after the procedure is performed.

In the body of the procedure, the user has connected a logic visualpiece 128 to the procedure visual piece 120 at connection point 127. Thelogic visual piece 128 in the illustrated example is an “if-else”statement. The user has connected a test expression 130 to the logicvisual piece 128 at connection point 129. In the illustrated example,the test expression 130 is whether the value of the variable B isgreater than or equal to the value of the variable A. The testexpression 130 is made up of a mathematical operator visual piece 132indicating the “greater than” operator, a first mathematical operandvisual piece 134 indicating the value of the variable B, and a secondmathematical operand visual piece 136 indicating the value of thevariable A.

If the test expression 130 is true, then a first mathematical expression138 is performed, e.g. “A=B−A.” The first mathematical expression 138 isconnected to the logic visual piece 128 at connection point 139. Asshould be appreciated, the first mathematical expression 138 is formedby five visual pieces. If the test expression 130 is false, then asecond mathematical expression 140 is performed, e.g., “A=B+A.” Thesecond mathematical expression 140 is connected to the logic visualpiece 128 at connection point 141. As should be appreciated, the secondmathematical expression 140 is formed by five visual pieces as well.

In the illustrated example, the menu area 102 includes drop down menusfor selecting different types of visual pieces. For example, the menuarea may include a “definition” drop down menu 106 for selectingdefinition visual pieces, a “text” drop down menu 108 for selecting textvisual pieces, a “lists” drop down menu 110 for selecting list visualpieces, a “math” drop down menu 112 for selecting mathematical visualpieces, a “logic” drop down menu 114 for selecting logic visual pieces,a “control” drop down menu 116 for selecting control visual pieces, anda “colors” drop down menu 118 for selecting color visual pieces. Theuser can chose a type of visual piece from one of the drop down menus.For example, the user may choose a mathematical visual piecerepresenting the “+” operand from the math drop down menu 112. In someembodiments, the chosen visual piece is then displayed in theprogramming area 104 of the VPI 100. Once displayed in the programmingarea 104, the user can incorporate the newly chosen visual piece intothe computer code being generated.

Referring now to FIGS. 3A and 3B, examples of visual pieces, e.g. visualpiece 202, visual piece 204, and visual piece 206, are depicted. In theexample of FIGS. 3A and 3B, the visual pieces are mathematical visualpieces and include an operator visual piece 202, a first operand visualpiece 204, and a second operand visual piece 206. It should beappreciated that the visual pieces described herein are provided forexample only, and the description contained herein is applicable toother types of visual pieces, not only mathematical visual pieces.

The operator visual piece 202 can include an instruction type 210. Inthe illustrated example, the instruction type 210 indicates that theoperator visual piece 202 is for a multiplication instruction. Theoperator visual piece 202 further includes three connectors 212, 214,and 216. In some embodiments, the connectors can further be classifiedas male connectors, e.g., connector 216, and female connectors, e.g.,connectors 212 and 214. As should be appreciated, a female connector ofa visual piece receives a male connector of another visual piece.

The first operand visual piece 204 can include an instruction type 220.In this example, the instruction type is a value of the variable “A.”The first operand visual piece 204 can also include a connector 222. Inthis example, the connector 222 is a male connector 222. Similarly, thesecond operand visual piece 206 includes an instruction type 230 and amale connector 232.

FIG. 3B illustrates an example of an expression 250. In the example, themale connector 222 (FIG. 3A) of the first operand visual piece 204 hasbeen inserted into the female connector 212 (FIG. 3A) of the operatorvisual piece 202 and the male connector 232 of the second operand visualpiece 206 has been inserted into the female connector 214. As should beappreciated, the mathematical expression 250 is “A*B.” The mathematicalexpression 250 can be included as part of a more complex expression byinserting the male connector 216 (FIG. 3A) of the operator visual piece202 into a female connector of another visual piece (Not Shown).

In general, the user can generate computer code by selecting a visualpiece and providing a command to move the selected visual piece to arequested location in the programming area 104 of the VPI 100. Forexample, the user can click on a selected visual piece and drag theselected visual piece to a requested location in the programming area104. The user can connect a plurality of visual pieces to createexpressions and/or statements, which in turn can be further connected tocreate more complex expressions and/or statements. It should beappreciated, that the user can create routines, subroutines, programs,and the like using the VPI 100. Once finished, the user can instruct acompiler associated with the visual programming module 50 to compile thegenerated computer code into computer-executable instructions that areexecutable by a processor. It is appreciated that the compiler can beimplemented in any suitable manner.

One situation that may arise is when the user moves a selected visualpiece into the proximity of a proximate visual piece, and for whateverreason, a connection is not formed between the selected visual piece andthe proximate visual piece. These situations may arise, for example,when the selected visual piece and the proximate visual piece are notcompatible instructions or when the connectors of the selected visualpiece and the proximate visual piece are close enough to one another toappear connected, but no connection has been made between the two visualpieces. The situations described above may be referred to asambiguities, as the user may believe that the two visual pieces areconnected when the two visual pieces are not actually connected. Inthese situations, the computer code that is generated from thecollection of visual pieces may not compile as the user desired, as theuser may be believe that a connection exists where no such connectionhas been made.

FIG. 4A illustrates an example of an ambiguity. In the example, the userhas attempted to connect a selected visual piece 408 to a complexexpression 400 at a female connector 406 of a proximate visual piece404. In the example, the proximate visual piece 404 is a control visualpiece for a procedure that can receive arguments. Thus, in order toconnect to proximate visual piece 404 at connector 406, the user shouldprovide a visual piece which represents a variable, e.g., an integer,character, string or the like. In the example, however, the selectedvisual piece 408 is a logic visual piece indicating an “OR” test. Asshould be appreciated, an “OR” test is not a valid argument for aprocedure. While the selected visual piece 408 and the proximate visualpiece 404 appear to be connected, no connection has been establishedbetween the selected visual piece 408 and the proximate visual piece404.

The visual programming module 50 can be configured to disambiguateunconnected visual pieces. FIG. 4B illustrates an example of the VPI 100after the visual programming module 50 has disambiguated the selectedvisual piece 408 and the proximate visual piece 404. In someembodiments, the visual programming module 50 can disambiguate twounconnected visual pieces by adjusting the position of at least one ofthe visual pieces such that the visual pieces no longer appear to beconnected. As should be appreciated, in FIG. 4B the selected visualpiece 408 has been moved to the right, thereby disambiguating theselected visual piece 408 and the proximate visual piece 404. Theexample of FIGS. 4A and 4B is provided for example only and is notintended to limit the scope of the disclosure.

FIG. 5 illustrates an example technique for identifying unconnectedvisual pieces, and disambiguating the unconnected visual pieces. At 502,the VPI 100 is generated and provided for display at a user device 30.At 504, user input indicating a command to move a selected visual pieceto a requested location in the VPI 100 can be received by the visualprogramming module 50. The command to move the selected visual piece maybe, for example, received when a user clicks and drags on the selectedvisual piece. The location at which the user releases the selectedvisual piece can be identified as the requested location. At 506, theposition of the selected visual piece is adjusted, such that theselected visual piece is located at the requested location in the VPI100.

At 508, the visual programming module 50 can locate a proximate visualpiece. It should be appreciated that the proximate visual piece can beany visual piece displayed in the VPI 100, or can be any visual piecewithin a predetermined distance from the selected visual piece. At 510,the visual programming module 50 can determine whether the proximatevisual piece is connected to the selected visual piece. The visualprogramming module 50 can make this determination in any suitablemanner. For instance, the visual programming module 50 can be configuredto generate data structures for each set of interconnected visualpieces, such that each interconnected visual piece in the set isconnected to at least one other interconnected visual piece in the set.The visual programming module 50 can determine that the selected visualpiece and the proximate visual piece are connected if both visual piecesare in the same data structure. When the selected visual piece and theproximate visual piece are connected, the visual programming module 50can determine whether there are any remaining proximate visual pieces toanalyze, as shown at 518, which is described in greater detail below. Ifthe selected visual piece and the proximate visual piece are not in thesame data structure, then the visual programming module 50 can determinethat the selected visual piece and the proximate visual piece are notconnected.

In some embodiments, the data structure is a hierarchical tree, wherethe highest level instruction is the root node of the hierarchical tree,visual pieces that are connected to the highest level instructions arechildren of the root node, and so on and so forth. For instance, in theexample of FIG. 2, the procedure visual piece 120 would be the root nodein the hierarchical tree, while the visual pieces 122, 124, 128 and 142,are the children nodes. Visual piece 132 would be a child node of logicvisual piece 128 and a grandchild node of visual piece 120. While ahierarchical tree is described, it should be appreciated that othersuitable data structures may be implemented. For example, a linked listcan represent a set of interconnected visual pieces.

When the selected visual piece and the proximate visual piece are notconnected, the visual programming module 50 can determine a distancebetween the selected visual piece and the proximate visual piece, asshown at 512. The distance between two visual pieces can represent anamount of units between two visual pieces, when measured from aparticular resolution. As should be appreciated, at differentresolutions, the selected visual piece and the proximate visual piecemay appear closer or further apart. Thus, the distance between the twovisual pieces may be based on the resolution that the visual pieces arecurrently being viewed at by the user, such that the greater theresolution, e.g., the greater amount of “zoom,” the larger the unit.

The distance between two visual pieces can be determined in any suitablemanner. For example, in embodiments where the visual pieces includeconnectors, the distance can be calculated from a first pointcorresponding to a connector of the selected visual piece to a secondpoint corresponding to a connector of the proximate visual piece.Further, in some embodiments, a distance table can be generated for theselected visual piece and the visual programming module 50 can determinethe distance from the distance table.

A distance table lists a position of one or more proximate visual pieceswith respect to the selected visual piece. The distance table can beindexed by one of the X-coordinates of the proximate visual pieces orthe Y-coordinates of the proximate visual pieces, such that if theselected visual piece is located at (0,0), the positions of theproximate visual pieces are represented with respect to the selectedvisual piece. For instance, if a specific proximate visual piece islocated two units to the right and two units up from the selected visualpiece, the specific proximate visual piece can be said to be located at(2,2). In embodiments where the distance table is referenced byX-coordinates, an entry corresponding to a particular proximate visualpiece in the distance table may be indexed at the X-coordinate of theparticular proximate visual piece, and may include a reference to theparticular proximate visual piece and the Y-coordinate of the particularvisual piece. For instance, in the example with the specific proximatevisual piece located at (2,2) with respect to the selected visual piece,the specific proximate visual piece can be indexed at X=2, and the entrycan include the Y-coordinate, e.g., 2, of the specific proximate visualpiece. As should be appreciated, a distance can then be calculated, forexample, by calculating the Euclidean distance between the selectedvisual piece and the proximate visual piece.

At 514, the visual programming module 50 can compare the distancebetween the selected visual piece and the proximate visual piece to adistance threshold. If the distance between the two visual pieces isgreater than the distance threshold, then it is unlikely that there isan ambiguity as to the connectedness of the selected visual piece andthe proximate visual piece. That is, the two visual pieces are notconnected and do not appear to be connected. If, however, the distanceis not greater than the distance threshold, then the selected visualpiece and the proximate visual piece may appear connected when in factthe two visual pieces are not connected.

When an ambiguity between the selected visual piece and the proximatevisual piece exists, the visual programming module 50 can disambiguatethe selected visual piece and the proximate visual piece by adjustingthe position of the selected visual piece and/or the proximate visualpiece, as shown at 516. In some embodiments, the visual programmingmodule 50 can adjust the position of the selected visual piece and/orthe proximate visual piece such that the distance between the two visualpieces exceeds the distance threshold. It should be appreciated thatwhen the position of the selected visual piece or the proximate visualpiece is adjusted, the positions of any visual pieces connected to theselected visual piece or the proximate visual piece are also adjusted.

In some embodiments, the visual programming module 50 can be configuredto adjust the position of the selected visual piece by moving theselected visual piece in a predetermined direction and a predetermineddistance. For example, if the selected visual piece is to the right ofthe proximate visual piece, the visual programming module 50 can movethe selected visual piece upward and further to the right by 2 units ineach direction. Similarly, if the selected visual piece is to the leftof the proximate visual piece, the selected visual piece can be moveddownward and further to the left. It should be appreciated that theposition of the proximate visual piece may also be adjusted in a similarmanner.

Once the position of the selected visual piece and/or the proximatevisual piece has been adjusted, the visual programming module 50determines whether there are any other proximate visual pieces toanalyze with respect to the selected visual piece, as shown at 518. Ifthere are other proximate visual pieces to analyze, the visualprogramming module 50 identifies a next proximate visual piece, as shownat 520, and returns to 510. If there are no other proximate visualpieces remaining, then the visual programming module 50 can update theVPI 100 to indicate the new position of the selected visual piece and/orany proximate visual pieces that may have had their respective positionsupdated.

In some scenarios, a situation may arise where the selected visual pieceis between two or more proximate visual pieces, the selected visualpiece is determined to be not connected to any of the proximate visualpieces, and the selected visual piece is within the distance thresholdfrom one of the proximate visual pieces. In such a scenario, the visualprogramming module 50 may enter an infinite loop if the position of theselected visual piece is toggled between the two or more proximatevisual pieces. To avoid such situations, the visual programming module50 can be configured to adjust the position of the selected visual pieceno more than twice or any of the proximate visual pieces no more thanonce. If a new ambiguity arises, then the visual programming module 50may be restricted to only moving a visual piece if the proximate visualpiece has not been previously moved. If none of the visual piecescausing the ambiguity can be moved, then a visual indicator such as awarning may be presented to the user via the VPI 100.

Referring now to FIG. 6, an example visual programming module 50 isdepicted. The visual programming module 50 can include a user interfacemodule 610, an ambiguity determination module 612, a distancedetermination module 614, and a data structure generation module 616.

The user interface module 610 can be configured to generate the VPI 100,which can be displayed at the user device 30. Furthermore, the userinterface module 610 can be further configured to receive user commands.For example, the user interface module 610 can receive a user command tomove a selected visual piece to a requested location in the programmingarea 104 of the VPI 100. Upon receiving such a user command, the userinterface module 610 can adjust the position of the selected visualpiece so that the selected visual piece is moved to the requestedlocation in the programming area 104 of the VPI 100.

The user interface module 610 can receive other user commands as well.For example, the user interface module 610 may receive user commandsindicating a type of visual piece that a user has chosen from the menuarea 102. Upon receiving such a user command, the user interface module610 may generate and display the chosen visual piece in the programmingarea 104.

The ambiguity determination module 612 analyzes the VPI 100 after atriggering event to determine if there are any ambiguities in the VPI100. An example of a triggering event is when a user provides a usercommand to move a selected visual piece to a requested location. Theambiguity determination module 612 can analyze the VPI 100 to determinewhether there is a visual piece that is not connected to another visualpiece and is within a distance threshold from the other visual piece.For example, the ambiguity determination module 612 can determine if theselected visual piece is connected to a proximate visual piece. When theselected visual piece is not connected to the proximate visual piece,the ambiguity determination module 612 can determine whether thedistance between the selected visual piece and the proximate visualpiece is less than or equal to a distance threshold. When the distanceis less than or equal to the distance threshold, e.g., an ambiguity hasbeen determined, the ambiguity determination module 612 can adjust theposition of the selected visual piece and/or a position of the proximatevisual piece in the VPI 100, such that the distance between the selectedvisual piece and the proximate visual piece is greater than thepredetermined distance threshold.

The data structure generation module 616 generates one or more datastructures that can be used by the ambiguity determination module 612 todetermine whether two visual pieces are connected. As indicated above,the data structure generation module 616 can generate, for example, ahierarchical tree based on the visual pieces displayed by the VPI 100and the connections between the visual pieces. The data structuregeneration module 616 can generate the data structure in any suitablemanner and provide the generated data structure to the ambiguitydetermination module 612.

As described above, the ambiguity determination module 612 can determinewhether the selected visual piece and a proximate visual piece areconnected by, for example, determining whether both visual pieces areincluded in the same data structure. If so, then the two visual piecesare connected. If the selected visual piece and the proximate visualpiece are not in the same data structure, the two visual pieces are notconnected. When the selected visual piece and the proximate visual pieceare not connected, the ambiguity determination module 612 can determinewhether there is an ambiguity between the selected visual piece and theproximate visual piece based on the distance between the selected visualpiece and the proximate visual piece.

The distance determination module 614 can determine a distance betweentwo visual pieces. It is appreciated that the distance determinationmodule 614 can determine the distance in any suitable manner. Forinstance, the distance determination module 614 can calculate aEuclidean distance between a point on the selected visual piece and apoint on a proximate visual piece. The distance determination module 614can calculate a distance with the selected visual piece for everyproximate visual piece displayed by the VPI 100 or only for relativelyclose proximate visual pieces.

In some embodiments, the distance determination module 614 can generatedistance tables for one or more visual pieces, including the selectedvisual piece. As described above, a distance table with respect to theselected visual piece can be generated by indexing each proximate visualpiece according to its location with respect to the selected visualpiece. Once a distance table has been generated, the distancedetermination module 614 can determine a distance between the selectedvisual piece and a proximate visual piece indexed in the distance tablebased on the index of the proximate visual piece and the othercoordinate corresponding to the proximate visual piece. For instance, ifa proximate visual piece is indexed at X=3, and the Y-coordinatecorresponding to the proximate visual piece is 4, then the distancedetermination module 614 can determine that the distance between theselected visual piece and the proximate visual piece is 5 units, e.g.,√{square root over ((x² _(proximate) _(—) _(visual) _(—) _(piece)+y²_(proximate) _(—) _(visual) _(—) _(piece)))}. It should be appreciatedthat in the foregoing example, the x value can be obtained from theindex, and the y value can be obtained from the entry corresponding tothe index.

The distance determination module 614 can return the distance betweenthe selected visual piece and the proximate visual piece to theambiguity determination module 612. The ambiguity determination module612 compares the distance between the selected visual piece and theproximate visual piece to a distance threshold. The distance thresholdcan be dependent on a current resolution or zoom of the VPI 100. Forinstance, if the amount of zoom is relatively high, then the distancethreshold can be increased as well. When the distance is less than orequal to the distance threshold, then the ambiguity determination module612 determines that an ambiguity exists.

When the ambiguity determination module 612 determines that an ambiguityexists, the ambiguity determination module 612 can disambiguate theselected visual piece and the proximate visual piece causing theambiguity. For example, the ambiguity determination module 612 canadjust the position of the selected visual piece and/or the position ofthe proximate visual piece, such that the distance between the twovisual pieces is greater than the distance threshold.

The ambiguity determination module 612 can analyze all of the visualpieces displayed in by the VPI 100 or can analyze visual pieces whichthe user has requested to be moved. The techniques described above havebeen provided for example only and are not intended to be limiting.

Example embodiments are provided so that this disclosure will bethorough, and will fully convey the scope to those who are skilled inthe art. Numerous specific details are set forth such as examples ofspecific components, devices, and methods, to provide a thoroughunderstanding of embodiments of the present disclosure. It will beapparent to those skilled in the art that specific details need not beemployed, that example embodiments may be embodied in many differentforms and that neither should be construed to limit the scope of thedisclosure. In some example embodiments, well-known procedures,well-known device structures, and well-known technologies are notdescribed in detail.

The terminology used herein is for the purpose of describing particularexample embodiments only and is not intended to be limiting. As usedherein, the singular forms “a,” “an,” and “the” may be intended toinclude the plural forms as well, unless the context clearly indicatesotherwise. The term “and/or” includes any and all combinations of one ormore of the associated listed items. The terms “comprises,”“comprising,” “including,” and “having,” are inclusive and thereforespecify the presence of stated features, integers, steps, operations,elements, and/or components, but do not preclude the presence oraddition of one or more other features, integers, steps, operations,elements, components, and/or groups thereof. The method steps,processes, and operations described herein are not to be construed asnecessarily requiring their performance in the particular orderdiscussed or illustrated, unless specifically identified as an order ofperformance. It is also to be understood that additional or alternativesteps may be employed.

Although the terms first, second, third, etc. may be used herein todescribe various elements, components, regions, layers and/or sections,these elements, components, regions, layers and/or sections should notbe limited by these terms. These terms may be only used to distinguishone element, component, region, layer or section from another region,layer or section. Terms such as “first,” “second,” and other numericalterms when used herein do not imply a sequence or order unless clearlyindicated by the context. Thus, a first element, component, region,layer or section discussed below could be termed a second element,component, region, layer or section without departing from the teachingsof the example embodiments.

As used herein, the term module may refer to, be part of, or include: anApplication Specific Integrated Circuit (ASIC); an electronic circuit; acombinational logic circuit; a field programmable gate array (FPGA); aprocessor or a distributed network of processors (shared, dedicated, orgrouped) and storage in networked clusters or datacenters that executescode or a process; other suitable components that provide the describedfunctionality; or a combination of some or all of the above, such as ina system-on-chip. The term module may also include memory (shared,dedicated, or grouped) that stores code executed by the one or moreprocessors.

The term code, as used above, may include software, firmware, byte-codeand/or microcode, and may refer to programs, routines, functions,classes, and/or objects. The term shared, as used above, means that someor all code from multiple modules may be executed using a single(shared) processor. In addition, some or all code from multiple modulesmay be stored by a single (shared) memory. The term group, as usedabove, means that some or all code from a single module may be executedusing a group of processors. In addition, some or all code from a singlemodule may be stored using a group of memories.

The techniques described herein may be implemented by one or morecomputer programs executed by one or more processors. The computerprograms include processor-executable instructions that are stored on anon-transitory tangible computer readable medium. The computer programsmay also include stored data. Non-limiting examples of thenon-transitory tangible computer readable medium are nonvolatile memory,magnetic storage, and optical storage.

Some portions of the above description present the techniques describedherein in terms of algorithms and symbolic representations of operationson information. These algorithmic descriptions and representations arethe means used by those skilled in the data processing arts to mosteffectively convey the substance of their work to others skilled in theart. These operations, while described functionally or logically, areunderstood to be implemented by computer programs. Furthermore, it hasalso proven convenient at times to refer to these arrangements ofoperations as modules or by functional names, without loss ofgenerality.

Unless specifically stated otherwise as apparent from the abovediscussion, it is appreciated that throughout the description,discussions utilizing terms such as “processing” or “computing” or“calculating” or “determining” or “displaying” or the like, refer to theaction and processes of a computer system, or similar electroniccomputing device, that manipulates and transforms data represented asphysical (electronic) quantities within the computer system memories orregisters or other such information storage, transmission or displaydevices.

Certain aspects of the described techniques include process steps andinstructions described herein in the form of an algorithm. It should benoted that the described process steps and instructions could beembodied in software, firmware or hardware, and when embodied insoftware, could be downloaded to reside on and be operated fromdifferent platforms used by real time network operating systems.

The present disclosure also relates to an apparatus for performing theoperations herein. This apparatus may be specially constructed for therequired purposes, or it may comprise a general-purpose computerselectively activated or reconfigured by a computer program stored on acomputer readable medium that can be accessed by the computer. Such acomputer program may be stored in a tangible computer readable storagemedium, such as, but is not limited to, any type of disk includingfloppy disks, optical disks, CD-ROMs, magnetic-optical disks, read-onlymemories (ROMs), random access memories (RAMs), EPROMs, EEPROMs,magnetic or optical cards, application specific integrated circuits(ASICs), or any type of media suitable for storing electronicinstructions, and each coupled to a computer system bus. Furthermore,the computers referred to in the specification may include a singleprocessor or may be architectures employing multiple processor designsfor increased computing capability.

The algorithms and operations presented herein are not inherentlyrelated to any particular computer or other apparatus. Variousgeneral-purpose systems may also be used with programs in accordancewith the teachings herein, or it may prove convenient to construct morespecialized apparatuses to perform the required method steps. Therequired structure for a variety of these systems will be apparent tothose of skill in the art, along with equivalent variations. Inaddition, the present disclosure is not described with reference to anyparticular programming language. It is appreciated that a variety ofprogramming languages may be used to implement the teachings of thepresent disclosure as described herein, and any references to specificlanguages are provided for disclosure of enablement and best mode of thepresent invention.

The present disclosure is well suited to a wide variety of computernetwork systems over numerous topologies. Within this field, theconfiguration and management of large networks comprise storage devicesand computers that are communicatively coupled to dissimilar computersand storage devices over a network, such as the Internet.

The foregoing description of the embodiments has been provided forpurposes of illustration and description. It is not intended to beexhaustive or to limit the disclosure. Individual elements or featuresof a particular embodiment are generally not limited to that particularembodiment, but, where applicable, are interchangeable and can be usedin a selected embodiment, even if not specifically shown or described.The same may also be varied in many ways. Such variations are not to beregarded as a departure from the disclosure, and all such modificationsare intended to be included within the scope of the disclosure.

What is claimed is:
 1. A computer-implemented method comprising:generating, at a computing device having one or more processors, avisual programming interface that is displayed at a user device, thevisual programming interface allowing a user to manipulate a pluralityof visual pieces that represent computer instructions to generatecomputer code, a connection between visual pieces representing arelationship between corresponding computer instructions in thegenerated computer code, each visual piece including at least oneconnector, wherein visual pieces are connected when their correspondingconnectors are aligned and their corresponding computer instructions arelogically compatible; receiving, at the computing device, user inputindicating a command to move a selected visual piece to a requestedlocation in the visual programming interface; generating, at thecomputing device, a distance table storing locations of one or moreother visual pieces with respect to the selected visual piece in thevisual programming interface, the distance table being indexed by one of(i) X-coordinates of the other visual pieces with respect to theselected visual piece and (ii) Y-coordinates of the other visual pieceswith respect to the selected visual piece; storing the other one of the(i) X-coordinates of the other visual pieces with respect to theselected visual piece and (ii) Y-coordinates of the other visual pieceswith respect to the selected visual piece, wherein the one or more othervisual pieces include the proximate visual piece; determining, at thecomputing device, whether the selected visual piece is connected to aproximate visual piece based on the distance table; when the selectedvisual piece is not connected to the proximate visual piece: i)determining a distance between the selected visual piece and theproximate visual piece, and ii) when the distance is not greater than apredetermined distance threshold, adjusting a position of the selectedvisual piece or the proximate visual piece such that the distance isgreater than the predetermined distance threshold.
 2. Acomputer-implemented method comprising: generating, at a computingdevice having one or more processors, a visual programming interfacethat is displayed at a user device, the visual programming interfaceallowing a user to manipulate a plurality of visual pieces thatrepresent computer instructions to generate computer code, a connectionbetween visual pieces representing a relationship between correspondingcomputer instructions in the generated computer code; receiving, at thecomputing device, user input indicating a command to move a selectedvisual piece to a requested location in the visual programminginterface; determining, at the computing device, whether the selectedvisual piece is connected to a proximate visual piece at the requestedlocation; when the selected visual piece is not connected to theproximate visual piece: i) determining a distance between the selectedvisual piece at the requested location and the proximate visual piece,and ii) when the distance is not greater than a predetermined distancethreshold, adjusting a position of the selected visual piece or theproximate visual piece such that the distance is greater than thepredetermined distance threshold.
 3. The method of claim 2, furthercomprising generating one or more data structures, each individual datastructure representing a set of interconnected visual pieces, whereineach interconnected visual piece in the set of interconnected visualpieces is connected to at least one other visual piece represented inthe individual data structure.
 4. The method of claim 3, wherein theselected visual piece is determined to be connected to the proximatevisual piece when the selected visual piece and the proximate visualpiece are members of a same data structure of the one or more datastructures.
 5. The method of claim 2, further comprising: generating adistance table storing locations of one or more other visual pieces withrespect to the selected visual piece in the visual programminginterface, the distance table being indexed by one of (i) X-coordinatesof the other visual pieces with respect to the selected visual piece and(ii) Y-coordinates of the other visual pieces with respect to theselected visual piece, and storing the other one of the (i)X-coordinates of the other visual pieces with respect to the selectedvisual piece and (ii) Y-coordinates of the other visual pieces withrespect to the selected visual piece, wherein the one or more othervisual pieces include the proximate visual piece.
 6. The method of claim5, further comprising determining whether the proximate visual piece iswithin the predetermined distance based on the distance table.
 7. Themethod of claim 2, wherein the plurality of visual pieces each includeat least one connector, wherein visual pieces are connected when theircorresponding connectors are aligned and their corresponding computerinstructions are logically compatible.
 8. The method of claim 2, whereinadjusting the position of the selected visual piece or the position ofthe proximate visual piece is in a predetermined direction and by apredetermined distance.
 9. The method of claim 8, further comprising:upon adjusting the position of the selected visual piece or theproximate visual piece: i) determining whether one of the selectedvisual piece and the proximate visual piece is connected to a differentproximate visual piece; ii) when the one of the selected visual pieceand the proximate visual piece is not connected to the differentproximate visual piece, determining a new distance between the one ofthe selected visual piece and the proximate visual piece and thedifferent proximate visual piece; and iii) when the new distance is notgreater than the predetermined distance threshold, adjusting a positionof the different proximate visual piece such that the new distance isgreater than the predetermined distance threshold.
 10. The method ofclaim 2, wherein the position of the selected visual piece is onlyadjusted no more than twice and the position of the proximate visualpiece is adjusted no more than once.
 11. The method of claim 2 whereinthe computer instructions include one or more of a declaration of avariable, an assignment of a value to the variable, a mathematicaloperation performed on one or more operands, an input instruction, anoutput instruction, a logic instruction, and a control instruction. 12.A computer-implemented system comprising: a user interface module that:a) generates a visual programming interface that is displayed at a userdevice, the visual programming interface allowing a user to manipulate aplurality of visual pieces that represent computer instructions togenerate computer code, a connection between visual pieces representinga relationship between corresponding computer instructions in thegenerated computer code, and b) receives user input indicating a commandto move a selected visual piece to a requested location in the visualprogramming interface; and an ambiguity determination module thatdetermines whether the selected visual piece is connected to a proximatevisual piece at the requested location, and when the selected visualpiece is not connected to the proximate visual piece: a) determines adistance between the selected visual piece at the requested location andthe proximate visual piece, and b) when the distance is not greater thana predetermined distance threshold, adjusts a position of the selectedvisual piece or the proximate visual piece such that the distance isgreater than the predetermined distance threshold.
 13. The system ofclaim 12, a data structure generation module that generates one or moredata structures, each individual data structure representing a set ofinterconnected visual pieces, wherein each interconnected visual piecein the set of interconnected visual pieces is connected to at least oneother visual piece represented in the individual data structure.
 14. Thesystem of claim 13, wherein the ambiguity determination moduledetermines that the selected visual piece is connected to the proximatevisual piece when the selected visual piece and the proximate visualpiece are members of a same data structure of the one or more datastructures.
 15. The system of claim 12, further comprising a distancedetermination module that: generates a distance table storing locationsof one or more other visual pieces with respect to the selected visualpiece in the visual programming interface, the distance table beingindexed by one of (i) X-coordinates of the other visual pieces withrespect to the selected visual piece and (ii) Y-coordinates of the othervisual pieces with respect to the selected visual piece, and stores theother one of the (i) X-coordinates of the other visual pieces withrespect to the selected visual piece and (ii) Y-coordinates of the othervisual pieces with respect to the selected visual piece, wherein the oneor more other visual pieces include the proximate visual piece.
 16. Thesystem of claim 15, wherein the ambiguity determination moduledetermines whether the proximate visual piece is within thepredetermined distance based on the distance table.
 17. The system ofclaim 12, wherein the plurality of visual pieces each include at leastone connector, wherein visual pieces are connected when theircorresponding connectors are and their corresponding computerinstructions are logically compatible.
 18. The system of claim 12,wherein the ambiguity determination module adjusts the position of theselected visual piece or the position of the proximate visual piece in apredetermined direction and by a predetermined distance.
 19. The systemof claim 18, wherein upon adjusting the position of the selected visualpiece or the position of the proximate visual piece, the ambiguitydetermination module: i) determines whether one of the selected visualpiece and the proximate visual piece is connected to a differentproximate visual piece; ii) when the one of the selected visual pieceand the proximate visual piece is not connected to the differentproximate visual piece, determines a new distance between the one of theselected visual piece and the proximate visual piece and the differentproximate visual piece; and iii) when the new distance is not greaterthan the predetermined distance threshold, adjusts a position of thedifferent proximate visual piece such that the new distance is greaterthan the predetermined distance threshold.
 20. The system of claim 12,wherein the position of the selected visual piece is only adjusted nomore than twice and the position of the proximate visual piece isadjusted no more than once.